<template>
  <view class="container">
    <u-form class="form-content">
      <!-- 身份证号输入 -->
      <u-form-item label="身份证号" class="form-item" label-width="120">
        <u-input
          v-model="formData.plateNumber"
          placeholder="请输入身份证号"
          class="custom-input"
        />
      </u-form-item>
    </u-form>
    <view class="btn-container">
      <u-button @click="goToquerycert()">立即查询</u-button>
    </view>
    <view class="card" v-if="showgoToquerycert">
      <view class="car-info">
        <view class="car-top">
          <view class="car-top-left">
            <up-icon name="photo"></up-icon>
            <text class="car-number">人员姓名:马飞</text>
          </view>
        </view>

        <view class="car-bottom" @click="goTopracDetails">
          <text class="transport-code">从业资格证名称：网约车司机aaa</text>
          <view>
            <up-icon name="arrow-right"></up-icon>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      formData: {
        plateNumber: "",
      },
      showgoToquerycert: false,
    };
  },
  methods: {
    goToquerycert() {
      this.showgoToquerycert = true;
    },
		goTopracDetails(){
			uni.redirectTo({
				url:'/pages/hub_zsyg/prac/pracdetails'
			})
		}
  },
};
</script>

<style scoped lang="scss">
.container {
  width: 100%;
  height: 100vh;
  padding: 10px;
  background-color: #f3f6fa;
  box-sizing: border-box;
}
//按钮样式
.btn-container {
  margin: 20px 0;
  text-align: center;

  width: 100%;
  box-sizing: border-box;
  ::v-deep .u-button--info[data-v-461e713c] {
    width: 100%;
    background-color: #2877ff;
    color: #ffffff;
  }
}
.form-content {
  background-color: #ffffff;
  padding: 0;
  /* 去掉 padding */
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  .form-item {
    padding: 0 10px;
    border-bottom: 1px solid #f1f1f1;
    /* 设置下边框 */
  }
  .custom-input {
    border: none;
    /* 去掉输入框的边框 */
    background-color: transparent;
    /* 使背景透明 */
  }
}

/* 定义卡片的背景、圆角和阴影 */
.card {
  background-color: #fff;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  /* 图标与车辆信息的布局 */
  .car-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    .car-top {
      display: flex;
      align-items: center;
      justify-content: space-around;
      padding: 10px 0;
      border-bottom: 1px solid #f1f1f1;
      margin-bottom: 10px;
      .car-top-left {
        display: flex;
        align-items: center;
        flex: 1;
        .car-number {
          margin-left: 10px;
          font-size: 16px;
          color: #2877ff;
        }
      }
    }
    .car-bottom {
      flex: 1;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .transport-code {
      font-size: 12px;
      color: #79829c;
    }
    .icon {
      width: 40px;
      height: 40px;
    }
  }
}
</style>
